Skip to content

[EuiToolTip] Replace all title attributes with EuiToolTip#9643

Merged
weronikaolejniczak merged 20 commits into
elastic:mainfrom
weronikaolejniczak:feat/replace-title
May 27, 2026
Merged

[EuiToolTip] Replace all title attributes with EuiToolTip#9643
weronikaolejniczak merged 20 commits into
elastic:mainfrom
weronikaolejniczak:feat/replace-title

Conversation

@weronikaolejniczak
Copy link
Copy Markdown
Contributor

@weronikaolejniczak weronikaolejniczak commented May 7, 2026

Tip

Review the changes commit-by-commit. These changes need to be on the same PR so that I can easily test them in Kibana and to avoid possible conflicts when merging to main.

Summary

Note

All remaining title attributes are ones that have to do with truncation. The effort and impact of conditionally rendering EuiToolTip is high but the value is low.

API Changes

N/A

Screenshots

EuiAvatar (Storybook)

Hover an avatar with a name prop to see the name as a tooltip.

Before After
Kapture 2026-05-11 at 15 56 28 Kapture 2026-05-11 at 15 56 54

EuiBasicTable (Storybook)

Hover the select-all / row-select checkboxes, row action icons (especially disabled ones), and pagination arrows.

Remaining title: hover truncated column headers.

Before After
Kapture 2026-05-18 at 16 27 11 Kapture 2026-05-18 at 16 27 57

EuiBreadcrumbs (Storybook)

Hover the breadcrumb that opens a popover (the one with a chevron icon).

Remaining title: hover a regular breadcrumb link.

Before After
Kapture 2026-05-18 at 16 42 15 Kapture 2026-05-18 at 16 46 12

EuiComboBox (Storybook)

Hover an option that has a tooltip (see "With Tooltip" story). truncationProps story result comes from changes made to EuiTextTruncate.

Remaining title:

  • The pill in EuiComboBox is an EuiBadge for which we left the browser tooltips.
  • The "Default Truncation" story.
Before After
Kapture 2026-05-18 at 18 07 37 Kapture 2026-05-18 at 18 08 31

EuiDataGrid (Storybook)

Hover the in-cell expand button.

The display and keyboard shortcuts toolbar buttons already had EuiToolTip. disableScreenReaderOutput was added to prevent duplicate SR announcements.

Before After
Kapture 2026-05-18 at 19 51 01 Kapture 2026-05-18 at 19 50 33

EuiAutoRefresh (Storybook)

Hover the auto-refresh button. Tested with EuiSuperDatePicker.

EuiSuperDatePicker (Storybook)

Hover the start / end date display buttons, the invalid field after inputting from date, the submit (✓) button inside the absolute date tab when writing a date in the field, the quick-select (calendar) toggle button, and the auto-refresh button when isPaused is set to false.

Before After
Kapture 2026-05-18 at 19 15 35
Kapture 2026-05-18 at 20 14 39 |

EuiFieldPassword (Storybook)

Hover the show / hide-password (eye) button next to the input.

Before After
Kapture 2026-05-18 at 18 32 07 Kapture 2026-05-18 at 18 32 33

EuiMarkdownEditor (Storybook)

Hover the "Syntax help" button (M↓) in the editor footer.

Before After
Kapture 2026-05-18 at 18 22 58 Kapture 2026-05-18 at 18 23 25

EuiPagination (Storybook)

Hover the previous / next (and first / last, when shown) arrow buttons. Tested with EuiBasicTable.

EuiSearchBar (Storybook)

Enter an invalid query to see the error message as a tooltip on the search input.

Before After
Kapture 2026-05-18 at 19 00 40 Kapture 2026-05-18 at 19 01 19

EuiSelectable (Storybook)

Hover an option in the selectable list. No conflicting tooltips.

Remaining title: when tooltip or truncationProps are not provided.

Before After
Kapture 2026-05-18 at 18 42 41 Kapture 2026-05-18 at 18 43 26

EuiTextTruncate (Storybook)

Hover the rendered text. Tooltip should appear only when the text is actually truncated.

Before After
Kapture 2026-05-18 at 18 51 36 Kapture 2026-05-18 at 18 51 58
Kapture 2026-05-18 at 18 52 37 Kapture 2026-05-18 at 18 52 56

Impact Assessment

Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.

  • 🔴 Breaking changes — What will break? How many usages in Kibana/Cloud UI are impacted?
  • 💅 Visual changes — May impact style overrides; could require visual testing. Explain and estimate impact.
  • 🧪 Test impact — May break functional or snapshot tests (e.g., HTML structure, class names, default values).
  • 🔧 Hard to integrate — If changes require substantial updates to Kibana, please stage the changes and link them here.

Impact level: 🟡 Moderate
Kibana PR: elastic/kibana#268225

Release Readiness

QA instructions for reviewer

Test these components in Storybook:

  • EuiAvatar (Storybook, Docs)
    • there is no browser tooltip
    • there is a meaningful EuiToolTip
    • there is no visual regression
    • disabled triggers still show a tooltip
    • VoiceOver announces tooltip correctly (no repetition)
    • NVDA announces tooltip correctly (no repetition)
    • JAWS announced tooltip correctly (no repetition)
    • all docs examples work
  • EuiBasicTable (Storybook, Docs)
    • there is no browser tooltip (except for truncation)
    • there are no browser and custom tooltips at once
    • there is no visual regression
    • tooltip triggers are keyboard focusable
    • disabled triggers still show a tooltip
    • VoiceOver announces tooltip correctly (no repetition)
    • NVDA announces tooltip correctly (no repetition)
    • JAWS announced tooltip correctly (no repetition)
    • all docs examples work
  • EuiBreadcrumbs (Storybook, Docs)
    • there is no browser tooltip (except for truncation)
    • there are no browser and custom tooltips at once
    • there is no visual regression
    • tooltip triggers are keyboard focusable
    • VoiceOver announces tooltip correctly (no repetition)
    • NVDA announces tooltip correctly (no repetition)
    • JAWS announced tooltip correctly (no repetition)
    • all docs examples work
  • EuiComboBox (Storybook, Docs)
    • there is no browser tooltip (except for truncation)
    • there are no browser and custom tooltips at once
    • there is no visual regression
    • tooltip triggers are keyboard focusable
    • tooltip only appears when text is truncated
    • VoiceOver announces tooltip correctly (no repetition)
    • NVDA announces tooltip correctly (no repetition)
    • JAWS announced tooltip correctly (no repetition)
    • all docs examples work
  • EuiDataGrid (Storybook, Docs)
    • there is no browser tooltip (except for truncation)
    • there is a meaningful EuiToolTip
    • there is no visual regression
    • tooltip triggers are keyboard focusable
    • VoiceOver announces tooltip correctly (no repetition)
    • NVDA announces tooltip correctly (no repetition)
    • JAWS announced tooltip correctly (no repetition)
    • all docs examples work
  • EuiSuperDatePicker (Storybook, Docs)
    • there is no browser tooltip
    • there is a meaningful EuiToolTip
    • there is no visual regression
    • tooltip triggers are keyboard focusable
    • VoiceOver announces tooltip correctly (no repetition)
    • NVDA announces tooltip correctly (no repetition)
    • JAWS announced tooltip correctly (no repetition)
    • all docs examples work
  • EuiFieldPassword (Storybook, Docs)
    • there is no browser tooltip
    • there is a meaningful EuiToolTip
    • there is no visual regression
    • tooltip triggers are keyboard focusable
    • VoiceOver announces tooltip correctly (no repetition)
    • NVDA announces tooltip correctly (no repetition)
    • JAWS announced tooltip correctly (no repetition)
    • all docs examples work
  • EuiMarkdownEditor (Storybook, Docs)
    • there is no browser tooltip
    • there is no visual regression
    • tooltip triggers are keyboard focusable
    • VoiceOver announces tooltip correctly (no repetition)
    • NVDA announces tooltip correctly (no repetition)
    • JAWS announced tooltip correctly (no repetition)
    • all docs examples work
  • EuiSearchBar (Storybook, Docs)
    • there is no browser tooltip
    • there is a meaningful EuiToolTip
    • there is no visual regression
    • tooltip triggers are keyboard focusable
    • VoiceOver announces tooltip correctly (no repetition)
    • NVDA announces tooltip correctly (no repetition)
    • JAWS announced tooltip correctly (no repetition)
    • all docs examples work
  • EuiSelectable (Storybook, Docs)
    • there is no browser tooltip (except for truncation)
    • there are no browser and custom tooltips at once
    • there is no visual regression
    • tooltip triggers are keyboard focusable
    • disabled triggers still show a tooltip
    • VoiceOver announces tooltip correctly (no repetition)
    • NVDA announces tooltip correctly (no repetition)
    • JAWS announced tooltip correctly (no repetition)
    • all docs examples work
  • EuiTextTruncate (Storybook, Docs)
    • there is no browser tooltip
    • there is a meaningful EuiToolTip
    • there is no visual regression
    • tooltip triggers are keyboard focusable
    • tooltip only appears when text is truncated
    • VoiceOver announces tooltip correctly (no repetition)
    • NVDA announces tooltip correctly (no repetition)
    • JAWS announced tooltip correctly (no repetition)
    • all docs examples work

Checklist before marking Ready for Review

Reviewer checklist

  • Approved Impact Assessment — Acceptable to merge given the consumer impact.
  • Approved Release Readiness — Docs, Figma, and migration info are sufficient to ship.

@weronikaolejniczak weronikaolejniczak marked this pull request as ready for review May 18, 2026 19:55
@weronikaolejniczak weronikaolejniczak requested a review from a team as a code owner May 18, 2026 19:55
Copilot AI review requested due to automatic review settings May 18, 2026 19:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces a wide set of native HTML title attributes with EuiToolTip usages to standardize tooltip behavior and reduce duplicate/verbose screen reader announcements across EUI components. It also extends EuiToolTip’s display prop to support flex layouts.

Changes:

  • Replaced multiple title-based tooltips with EuiToolTip across core components (tables, pagination, breadcrumbs, date pickers, etc.)
  • Updated truncation behavior to use EuiToolTip + keyboard focus support (EuiTextTruncate)
  • Updated unit/Cypress tests and snapshots to reflect new tooltip DOM and a11y behavior, and added a new story variant for the Markdown editor

Reviewed changes

Copilot reviewed 68 out of 68 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/website/docs/components/display/avatar.mdx Add accessibility guidance for avatar tooltips
packages/eui/src/components/tool_tip/tool_tip.tsx Allow display="flex" on tooltip anchors
packages/eui/src/components/tool_tip/tool_tip.styles.ts Add flex anchor display styling
packages/eui/src/components/timeline/snapshots/timeline.test.tsx.snap Snapshot updates for avatar tooltip wrapper
packages/eui/src/components/timeline/snapshots/timeline_item.test.tsx.snap Snapshot updates for avatar tooltip wrapper
packages/eui/src/components/text_truncate/text_truncate.tsx Replace truncation title with EuiToolTip + tabindex
packages/eui/src/components/text_truncate/text_truncate.test.tsx Add/adjust tooltip-related unit tests
packages/eui/src/components/text_truncate/text_truncate.spec.tsx Update Cypress spec for tooltip/tabindex behavior
packages/eui/src/components/table/table_pagination/snapshots/table_pagination.test.tsx.snap Snapshot updates for pagination tooltip wrappers
packages/eui/src/components/table/table_header_cell.test.tsx Add assertion for header cell title behavior
packages/eui/src/components/selectable/selectable.spec.tsx Cypress spec updates removing title assertions
packages/eui/src/components/selectable/selectable_list/selectable_list.tsx Only set title when no tooltip/truncation props
packages/eui/src/components/search_bar/search_box.tsx Preserve consumer onFocus while showing hint
packages/eui/src/components/search_bar/search_bar.tsx Wrap search box with EuiToolTip for errors
packages/eui/src/components/search_bar/search_bar.test.tsx Update tests away from findByTitle
packages/eui/src/components/search_bar/filters/field_value_selection_filter.spec.tsx Cypress spec updates removing title selectors
packages/eui/src/components/search_bar/snapshots/search_bar.test.tsx.snap Snapshot updates for tooltip wrapper markup
packages/eui/src/components/pagination/pagination_button_arrow.tsx Replace pagination arrow title with EuiToolTip
packages/eui/src/components/pagination/snapshots/pagination.test.tsx.snap Snapshot updates for pagination tooltip wrappers
packages/eui/src/components/markdown_editor/markdown_editor.stories.tsx Add “NoPlugins” story variant
packages/eui/src/components/markdown_editor/markdown_editor_help_button.tsx Replace/adjust help button tooltip behavior
packages/eui/src/components/markdown_editor/snapshots/markdown_editor.test.tsx.snap Snapshot updates for tooltip wrapper IDs
packages/eui/src/components/header/header.a11y.tsx Update selector away from title
packages/eui/src/components/form/field_password/field_password.tsx Replace toggle button title with EuiToolTip
packages/eui/src/components/form/field_password/field_password.test.tsx Update unit tests removing title expectations
packages/eui/src/components/form/field_password/snapshots/field_password.test.tsx.snap Snapshot updates for tooltip wrappers
packages/eui/src/components/date_picker/super_date_picker/time_window_buttons.tsx Remove explicit title="" suppression on buttons
packages/eui/src/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.tsx Replace quick select button title with EuiToolTip
packages/eui/src/components/date_picker/super_date_picker/quick_select_popover/snapshots/quick_select_popover.test.tsx.snap Snapshot updates for tooltip wrapper markup
packages/eui/src/components/date_picker/super_date_picker/date_popover/date_popover_button.tsx Replace date popover button title with EuiToolTip
packages/eui/src/components/date_picker/super_date_picker/date_popover/absolute_tab.tsx Replace submit button title with EuiToolTip
packages/eui/src/components/date_picker/super_date_picker/date_popover/snapshots/date_popover_button.test.tsx.snap Snapshot updates removing title
packages/eui/src/components/date_picker/super_date_picker/snapshots/time_window_buttons.test.tsx.snap Snapshot updates showing returned title attrs
packages/eui/src/components/date_picker/super_date_picker/snapshots/super_date_picker.test.tsx.snap Snapshot updates for tooltip wrapper markup
packages/eui/src/components/date_picker/auto_refresh/auto_refresh.tsx Replace auto-refresh title with EuiToolTip
packages/eui/src/components/date_picker/auto_refresh/snapshots/auto_refresh.test.tsx.snap Snapshot updates for tooltip wrapper markup
packages/eui/src/components/datagrid/data_grid.test.tsx Update assertions away from getByTitle
packages/eui/src/components/datagrid/controls/keyboard_shortcuts.tsx Disable SR output for toolbar tooltip
packages/eui/src/components/datagrid/controls/display_selector.tsx Disable SR output for toolbar tooltip
packages/eui/src/components/datagrid/controls/data_grid_toolbar.stories.tsx Disable SR output for story tooltip
packages/eui/src/components/datagrid/controls/column_sorting_draggable.test.tsx Update tests away from .title usage
packages/eui/src/components/datagrid/controls/snapshots/keyboard_shortcuts.test.tsx.snap Snapshot updates for tooltip wrapper IDs
packages/eui/src/components/datagrid/controls/snapshots/display_selector.test.tsx.snap Snapshot updates for tooltip wrapper IDs
packages/eui/src/components/datagrid/body/cell/data_grid_cell_actions.tsx Replace expand button title with EuiToolTip (flex)
packages/eui/src/components/datagrid/body/cell/data_grid_cell_actions.test.tsx Update tests removing title expectations
packages/eui/src/components/datagrid/snapshots/data_grid.test.tsx.snap Snapshot updates for pagination tooltip wrappers
packages/eui/src/components/comment_list/snapshots/comment.test.tsx.snap Snapshot updates for avatar tooltip wrappers
packages/eui/src/components/comment_list/snapshots/comment_timeline.test.tsx.snap Snapshot updates for avatar tooltip wrappers
packages/eui/src/components/comment_list/snapshots/comment_list.test.tsx.snap Snapshot updates for avatar tooltip wrappers
packages/eui/src/components/comment_list/snapshots/comment_event.test.tsx.snap Snapshot updates for avatar tooltip wrappers
packages/eui/src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx Only set title for truncation-only cases
packages/eui/src/components/card/snapshots/card.test.tsx.snap Snapshot updates for avatar tooltip wrappers
packages/eui/src/components/breadcrumbs/_breadcrumb_content.tsx Replace breadcrumb popover title with EuiToolTip
packages/eui/src/components/breadcrumbs/snapshots/breadcrumbs.test.tsx.snap Snapshot updates for breadcrumb tooltip wrappers
packages/eui/src/components/breadcrumbs/snapshots/breadcrumb.test.tsx.snap Snapshot updates for breadcrumb tooltip wrappers
packages/eui/src/components/breadcrumbs/snapshots/_breadcrumb_content.test.tsx.snap Snapshot updates for breadcrumb tooltip wrappers
packages/eui/src/components/basic_table/default_item_action.tsx Remove disabled title, ensure aria-disabled handling
packages/eui/src/components/basic_table/collapsed_item_actions.tsx Replace title with tooltip + aria-disabled
packages/eui/src/components/basic_table/basic_table.tsx Replace checkbox titles with tooltips; minor a11y tweaks
packages/eui/src/components/basic_table/basic_table.test.tsx Update disabled assertions to aria-disabled
packages/eui/src/components/basic_table/snapshots/pagination_bar.test.tsx.snap Snapshot updates for pagination tooltip wrappers
packages/eui/src/components/basic_table/snapshots/in_memory_table.test.tsx.snap Snapshot updates for checkbox/pagination tooltips
packages/eui/src/components/basic_table/snapshots/collapsed_item_actions.test.tsx.snap Snapshot updates for tooltip wrapper IDs
packages/eui/src/components/basic_table/snapshots/basic_table.test.tsx.snap Snapshot updates for checkbox/pagination tooltips
packages/eui/src/components/avatar/avatar.tsx Replace avatar title with EuiToolTip
packages/eui/src/components/avatar/avatar.test.tsx Add hover tooltip test
packages/eui/src/components/avatar/snapshots/avatar.test.tsx.snap Snapshot updates for avatar tooltip wrapper markup
packages/eui/changelogs/upcoming/9643.md Changelog entry for tooltip migration + flex display

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/website/docs/components/display/avatar.mdx
Comment thread packages/eui/src/components/search_bar/search_bar.tsx Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 65 out of 65 changed files in this pull request and generated 3 comments.

Comment thread packages/eui/src/components/text_truncate/text_truncate.tsx
Comment thread packages/eui/src/components/search_bar/search_bar.tsx Outdated
Comment thread packages/website/docs/components/display/avatar.mdx
Copy link
Copy Markdown
Contributor

@mgadewoll mgadewoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I manually tested the listed components and almost everything works as expected. I found one small A11y regression:

  • EuiBreadcrumbs doesn't read the tooltip in NVDA
Screen.Recording.2026-05-21.at.11.05.08.mov

ℹ️ I smoke tested some codesandboxes but they load with @latest EUI not the PR state, hence we can't verify that the PR changes themselves work there as well.

Comment thread packages/eui/src/components/avatar/avatar.tsx
Comment thread packages/eui/src/components/breadcrumbs/_breadcrumb_content.tsx Outdated
Comment thread packages/eui/src/components/search_bar/search_bar.tsx Outdated
Comment thread packages/eui/src/components/search_bar/search_bar.tsx Outdated
Comment thread packages/eui/src/components/basic_table/default_item_action.tsx
Comment thread packages/eui/src/components/text_truncate/text_truncate.tsx Outdated
@elasticmachine
Copy link
Copy Markdown
Collaborator

@elasticmachine
Copy link
Copy Markdown
Collaborator

@weronikaolejniczak
Copy link
Copy Markdown
Contributor Author

ℹ️ I smoke tested some codesandboxes but they load with @latest EUI not the PR state, hence we can't verify that the PR changes themselves work there as well.

That's a very good point 👍🏻 I didn't realize. I removed all these checkboxes from the checklist.

I believe I've addressed all your concerns in 9c74f5e, @mgadewoll! I also fixed the previously failing Cypress tests. Thank you for the thorough review 🙏🏻 I'm surprised how I missed some of the things you've raised, so I greatly appreciate all comments 😄

Testing notes

EuiTextTruncate (Storybook, Docs)

  • tab through a page containing truncated text, no extra tab stops on the truncated element
  • mouse-hover a truncated string → tooltip shows full text
  • screen readers read full text (tested with VoiceOver and NVDA)
Screenshots/gifs/videos

Kapture 2026-05-26 at 12 28 08 Kapture 2026-05-26 at 12 28 38

Kapture.2026-05-26.at.12.45.15.mp4

EuiSearchBar (Storybook, Docs)

  • type an invalid query, press Enter → error tooltip appears AND input keeps focus
  • repeatedly toggle between valid/invalid queries → focus is retained throughout
Screenshots/gifs/videos

Kapture 2026-05-26 at 12 53 56

EuiBreadcrumbs (Storybook, Docs)

  • breadcrumb with an explicit title prop (e.g. the collapsed "..." breadcrumb) → NVDA reads the tooltip
  • breadcrumb without explicit title → NVDA reads only the visible label (no duplication)
  • popover-style breadcrumb still opens correctly on click
Screenshots/gifs/videos

Kapture 2026-05-26 at 12 41 02

Kapture.2026-05-26.at.12.58.23.mp4

EuiAvatar (Storybook, Docs) / EuiComment (Storybook, Docs)

  • EuiComment with no timelineAvatarAriaLabel → inspect DOM: no .euiToolTipAnchor wrapping the avatar
  • avatar with a name still shows tooltip on hover
Screenshots/gifs/videos

Screenshot 2026-05-26 at 12 38 57 Screenshot 2026-05-26 at 12 39 26 Kapture 2026-05-26 at 12 40 03

EuiSuperDatePicker (Storybook, Docs)

  • date popover button tooltip anchor still fills its container
Screenshots/gifs/videos

Screenshot 2026-05-26 at 12 35 50

EuiComboBox (Storybook, Docs)

  • dropdown options with long labels still show a native browser tooltip on hover (when not wrapped with EuiToolTip)
Screenshots/gifs/videos

Kapture 2026-05-26 at 12 36 42 Kapture 2026-05-26 at 12 37 03

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

return (
<EuiBreadcrumbPopover
{...popoverButtonProps}
title={title}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny tiny nit, non-blocking: we don't need to add title here, it's already included in popoverButtonProps.

Copy link
Copy Markdown
Contributor

@mgadewoll mgadewoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Changes are LGTM and working correctly. Thanks for the detailed overview and reports as well as the additional updates! I retested the last updated components, everything works as expected. 🎉

@weronikaolejniczak
Copy link
Copy Markdown
Contributor Author

❗ Not merging until this week's release is tagged.

@weronikaolejniczak weronikaolejniczak merged commit b9bb26e into elastic:main May 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EuiBasicTable] NVDA duplicate announcements in selection + overflow actions (All actions tooltip) and verbose pagination aria-label

4 participants